<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: product_info.php 303 2013-09-23 10:48:30Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 303 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-23 10:48:30 +0000 (Mon, 23 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */
include('includes/application_top.php');

if(MODULE_SEO_URL_INDEX_STATUS == 'True' && strstr($_SERVER['REQUEST_URI'], 'product_info.php?products_id='))
	redirect(href_link(FILENAME_PRODUCT_INFO, 'products_id='.(int)$_GET['products_id']));

$smarty = new Smarty();

if($_GET['products_id']) {
	$cat = $db->db_query_limit("SELECT categories_id FROM ".TABLE_PRODUCTS_TO_CATEGORIES." WHERE products_id='".(int) $_GET['products_id']."'", 1);
	require(DIR_FS_INC.'inc.get_path.php');
	if($cat->fields['categories_id']) {
		$cPath = input_validation(get_path($cat->fields['categories_id']), 'cPath', '');
		$_GET['cPath'] = $cPath;
	}
}

require(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/boxes.php');

require_once(DIR_FS_INC.'inc.get_download.php');
require_once(DIR_FS_INC.'inc.date_long.php');

if($_GET['action'] == 'get_download')
	get_download($_GET['cID']);

require(DIR_WS_INCLUDES.'xajax/xajax_core/xajax.inc.php');
if(!is_object($xajax)) $xajax = new xajax();

include (DIR_WS_MODULES.'product_info.php');
require(DIR_WS_INCLUDES.'xajax/xajax.product_info.php');
require(DIR_WS_INCLUDES.'xajax/xajax.product_images.php');
require(DIR_WS_INCLUDES.'xajax/xajax.add_cart.php');
require(DIR_WS_INCLUDES.'header.php');

$smarty->assign('language', $_SESSION['language']);
$smarty->caching = false;
if (!defined('RM'))
	$smarty->loadFilter('output', 'note');
$smarty->loadFilter('output','trimwhitespace');
$smarty->display(CURRENT_TEMPLATE.'/index.html');
include ('includes/application_bottom.php');